<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title> | Java专家随笔记</title>
    <meta property="og:title" content=" - Java专家随笔记">
    <meta property="og:type" content="article">
        
        
    <meta name="Keywords" content="Java,算法......其他以后再加">
    <meta name="description" content="">
        
    <meta name="author" content="gwozai">
    <meta property="og:url" content="https://gwozai.com/post/linuxhomwork/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>


<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://gwozai.com/">
                        Java专家随笔记
                    </a>
                
                <p class="description">一切有为法，如梦幻泡影，如露亦如电，应作如是观</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://gwozai.com/">首页</a>
                    
                    <a  href="https://gwozai.com/tools/" title="工具">工具</a>
                    
                    <a  href="https://gwozai.com/archives/" title="归档">归档</a>
                    
                    <a  href="https://gwozai.com/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents"></nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title"></h1>
        </header>
        <date class="post-meta meta-date">
            1年1月1日
        </date>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="post-content">
            <h1 id="第六章作业">第六章作业</h1>
<p>1</p>
<pre><code>echo $SHELL

</code></pre><p>2</p>
<pre><code>AK=200
echo $AK
</code></pre><p>3</p>
<pre><code>

AM=100

test $AM -gt 150

echo $?
</code></pre><p>4.编写文件1.sh</p>
<pre><code>#!/bin/bash
hostname
date
</code></pre><pre><code>
chmod 755 1.sh
./1.sh

</code></pre><p>#2.编写2.sh</p>
<p>如何编写和运行脚本</p>
<pre><code>#!/bin/bash
read n
sum = 0
for((i=1;i&lt;=n;i++))
do
	let sum=sum+i
done
echo @$sum
</code></pre><p>3.编写3.sh</p>
<pre><code>#!/bin/bash
sum=0
loop=0
until [ $loop -eq 10 ]
do
	let loop-$loop+1
	let sum-sum+loop*loop
done
echo $sum
</code></pre>
        </div>

        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="https://gwozai.com/">gwozai</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="https://gwozai.com/post/linuxhomwork/">https://gwozai.com/post/linuxhomwork/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="http://gwozai.giee.io">gwozai的个人博客</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/%E7%88%AC%E8%99%AB-1-IP%E4%BB%A3%E7%90%86%E6%B1%A0/">IP代理池</a></li>
        
        <li><a href="/post/book/">Book</a></li>
        
        <li><a href="/post/mail/">邮箱服务</a></li>
        
        <li><a href="/post/sizhi/">Sizhi</a></li>
        
        <li><a href="/post/z/">Z</a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            没有标签
            
        </div>
    </article>
    
    <div id="disqus_thread"></div>
<script type="application/javascript">
    var disqus_config = function () {
    
    
    
    };
    (function() {
        if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
            document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
            return;
        }
        var d = document, s = d.createElement('script'); s.async = true;
        s.src = '//' + "yourdiscussshortname" + '.disqus.com/embed.js';
        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "ssazi/u"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2022 <a href="https://gwozai.com/">Java专家随笔记 By gwozai</a>
        
        | <a rel="nofollow" target="_blank" href="http://www.beian.miit.gov.cn/">晋ICP备2020013641号-3</a>
        
    </div>
    <br />
    <div>
        <div class="github-badge">
            <a href="https://gohugo.io/" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">Hugo</span></a>
        </div>
        <div class="github-badge">
            <a href="https://www.flysnow.org/" target="_black"><span class="badge-subject">Design by</span><span class="badge-value bg-brightgreen">飞雪无情</span></a>
        </div>
        <div class="github-badge">
            <a href="https://github.com/flysnow-org/maupassant-hugo" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">Maupassant</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://gwozai.com/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://gwozai.com/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://gwozai.com/post/%E7%88%AC%E8%99%AB-1-IP%E4%BB%A3%E7%90%86%E6%B1%A0/" title="IP代理池">IP代理池</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/book/" title="Book">Book</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/mail/" title="邮箱服务">邮箱服务</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/sizhi/" title="Sizhi">Sizhi</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/z/" title="Z">Z</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/activeMQ/" title="ActiveMQ">ActiveMQ</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/oneindex/" title="Oneindex">Oneindex</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/dos/" title="Dos">Dos</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/pycharm/" title="Pycharm">Pycharm</a>
    </li>
    
    <li>
        <a href="https://gwozai.com/post/zfile/" title="Zfile">Zfile</a>
    </li>
    
</ul>
    </section>

    
<section class="widget">
    <h3 class="widget-title" style="color:red">福利派送</h3>
    <ul class="widget-list">
        
        <li>
            <a href="https://www.aliyun.com/activity/1111?userCode=q8qrpnxv" title="精心挑选的热门优惠云产品，登录客户点击链接即成为您的关联客户购买最高可获31%返现。" target="_blank" style="color:red">
                
                    <img src="https://cdn.jsdelivr.net/gh/ssazi/img//img/img440-240%201.jpg">
                
            </a>
        </li>
        
        <li>
            <a href="https://s.qiniu.com/ui2uiy" title="爆款云产品全年最低价，热门产品 0 元秒杀，参与抽奖赢新款 iPhone" target="_blank" style="color:red">
                
                    <img src="https://cdn.jsdelivr.net/gh/ssazi/img/img/259X194.jpg">
                
            </a>
        </li>
        
        <li>
            <a href="https://curl.qcloud.com/FbfrTIg9" title="【腾讯云】爆款1核2G云服务器首年48元，还有iPad Pro、Bose耳机、京东卡等你来抽！https://cloud.tencent.com/act/cps/redirect?redirect=1575&amp;cps_key=84e8cfc536a354a142b3335df9b399aa&amp;from=console" target="_blank" style="color:red">
                
                    <img src="https://cdn.jsdelivr.net/gh/ssazi/img/img/345x200.jpg">
                
            </a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://gwozai.com/categories/PySimpleGUi/">PySimpleGUi (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/Redis/">Redis (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/Vmware/">Vmware (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/docker/">docker (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/frp/">frp (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/git/">git (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/github/">github (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/mail/">mail (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/minio/">minio (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/mysql/">mysql (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/nginx/">nginx (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/oss/">oss (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/python/">python (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/rclone/">rclone (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/%E5%8A%A0%E9%80%9F%E5%99%A8/">加速器 (3)</a></li>
    
    <li><a href="https://gwozai.com/categories/%E5%8D%9A%E5%AE%A2/">博客 (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构 (1)</a></li>
    
    <li><a href="https://gwozai.com/categories/%E6%B1%87%E7%BC%96%E5%8E%9F%E7%90%86/">汇编原理 (1)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://gwozai.com/tags/PySimpleGUi/">PySimpleGUi</a>
    
    <a href="https://gwozai.com/tags/Redis/">Redis</a>
    
    <a href="https://gwozai.com/tags/docker/">docker</a>
    
    <a href="https://gwozai.com/tags/frp/">frp</a>
    
    <a href="https://gwozai.com/tags/git/">git</a>
    
    <a href="https://gwozai.com/tags/github/">github</a>
    
    <a href="https://gwozai.com/tags/mail/">mail</a>
    
    <a href="https://gwozai.com/tags/minio/">minio</a>
    
    <a href="https://gwozai.com/tags/mysql/">mysql</a>
    
    <a href="https://gwozai.com/tags/nginx/">nginx</a>
    
    <a href="https://gwozai.com/tags/python/">python</a>
    
    <a href="https://gwozai.com/tags/rclone/">rclone</a>
    
    <a href="https://gwozai.com/tags/vmware/">vmware</a>
    
    <a href="https://gwozai.com/tags/%E5%8A%A0%E9%80%9F%E5%99%A8/">加速器</a>
    
    <a href="https://gwozai.com/tags/%E5%8D%9A%E5%AE%A2/">博客</a>
    
    <a href="https://gwozai.com/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
    
    <a href="https://gwozai.com/tags/%E6%B1%87%E7%BC%96%E5%8E%9F%E7%90%86/">汇编原理</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="http://zfile.gwozai.com" title="我的分享盘">我的分享盘</a>
        </li>
        
        <li>
            <a target="_blank" href="#ZgotmplZ" title="博客园">博客园</a>
        </li>
        
        <li>
            <a target="_blank" href="http://note.gwozai.com" title="在线记事本">在线记事本</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://gwozai.com/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>